package com.example.galgame;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button yes=findViewById(R.id.yes);
        Button no=findViewById(R.id.no);

        yes.setOnClickListener(this);
        no.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.yes: {
                Intent intent=new Intent();
                intent.setClass(MainActivity.this,firstchallenge.class);
                startActivity(intent);
            }break;
            case R.id.no: {
                Intent intent=new Intent();
                intent.setClass(MainActivity.this,ending2.class);
                startActivity(intent);
            }break;
        }
    }
}
